home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 33 / Amiga Format AFCD33 (Issue 117, Dec 1998).iso / -seriously_amiga- / graphics / visualengineer / arexx / logotexture.rexx < prev    next >
OS/2 REXX Batch file  |  1998-09-07  |  1KB  |  76 lines

  1. /*
  2.  
  3.    v1.10 Logo Texture
  4.  
  5.    Marko Seppänen
  6.    marko.seppanen@wwnet.fi
  7.  
  8. */
  9.  
  10.  
  11. address IMAGEENGINEER
  12.  
  13. Options results
  14. signal on error            /* Setup a place for errors to go */
  15.  
  16. if arg()=0 then exit
  17. palaute=arg(1)
  18.  
  19. GET PRIMARY
  20. logo=result
  21. GET SECONDARY
  22. sec=result
  23.  
  24. if sec=="" then do
  25.   'REQUEST "Choose texture as SECONDARY image" "OK"'
  26.   exit
  27. end
  28.  
  29.  
  30. PROJECT_INFO logo WIDTH
  31. width=result
  32. PROJECT_INFO logo HEIGHT
  33. height=result
  34.  
  35. RESIZE sec width height TILE
  36. tiletexture=result
  37.  
  38. CLOSE sec
  39.  
  40. HISTOGRAM_EQUALIZATION logo
  41. hieqlogo=result
  42.  
  43. CONTRAST hieqlogo "100"
  44. blacklogo=result
  45.  
  46. CLOSE hieqlogo
  47.  
  48. MARK blacklogo ALPHA
  49. MARK tiletexture SECONDARY
  50. COMPOSITE 0 0 ADD
  51.  
  52. CLOSE tiletexture
  53. CLOSE blacklogo
  54.  
  55.  
  56.  
  57. exit
  58.  
  59. /*******************************************************************/
  60. /* This is where control goes when an error code is returned by IE */
  61. /* It puts up a message saying what happened and on which line     */
  62. /*******************************************************************/
  63. error:
  64. if RC=5 then do            /* Did the user just cancel us? */
  65.     IE_TO_FRONT
  66.     LAST_ERROR
  67.     'REQUEST "'||RESULT||'"'
  68.     exit
  69. end
  70. else do
  71.     IE_TO_FRONT
  72.     LAST_ERROR
  73.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  74.     exit
  75. end
  76.